<%@ page language="java" contentType="text/html; charset=US-ASCII"
	pageEncoding="US-ASCII"%>
<%@ include file="/WEB-INF/include.jsp"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title><fmt:message key="edPeople" /></title>

</head>
<body>
<h1><fmt:message key="editheading" /></h1>
<h1>v1.03 Demo is ${demo}</h1>
<form method="post" action="">
<table id="peopleTable" bgcolor="f8f8ff" cellpadding="5">
	<tr>
		<td alignment="right">Name:</td>
		<!-- LL: Inside of a spring bind use status.value -->	
		<spring:bind path="person.name">			
			<td><input type="text" name="name"
				value='<c:out value="${status.value}"/>'></td>

			<td><font color="red"><c:out
				value="${status.errorMessage}" /></font></td>
		</spring:bind>
		<spring:bind path="person.email">
			<td><input type="text" name="email" value='<c:out value="${status.value}"/>'></td>
			<td><font color="red"><c:out
				value="${status.errorMessage}" /></font></td>
		</spring:bind>
		<spring:bind path="person.role">
			<td><input type="text" name="role"
				value='<c:out value="${status.value}"/>'></td>
			<td><font color="red"><c:out
				value="${status.errorMessage}" /></font></td>
		</spring:bind>
	</tr>
</table>
<br>
<spring:hasBindErrors name="person">
	<b>Please fix all errors!</b>
</spring:hasBindErrors>
<% if ( request.getParameter("cmd").equalsIgnoreCase("del") ) {	%>
		<p><input type="submit" value="delete">
		<p><a href='<c:url value="hello.html"/>'>Don't Delete</a>
	<% } else { %>
	<p><input type="submit">
	<% } %>	
<spring:bind path="person.cmd">
	<input type="hidden" name="cmd"
		value='<c:out value="${status.value}"/>'>
		<!--  TODO: Fix this.  There **IS** a better way -->
</spring:bind></p>
</form>
<a href='<c:url value="hello.html"/>'>Home</a>
</body>
</html>



